package com.aat.dxfy.string;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class TestRegex {

	public static void main(String[] args) {
		String sql = "select * from user where name = s{name} and age =n{age}";
		Pattern pattern = Pattern.compile("(?<=\\{)(.+?)(?=\\})");
		Matcher matcher = pattern.matcher(sql);
		while (matcher.find()) {
			
			System.out.println(matcher.group());
		}
	}

}
